package com.business.api.user.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.business.api.user.dto.UserDTO;
import com.business.api.user.from.UpdateUserInfoFrom;
import com.business.api.user.from.UserResetPasswordFrom;
import com.seed.core.exception.ServiceException;
import com.seed.core.pojo.dto.SeedMessageDTO;
import org.jeecg.modules.system.entity.SysUser;

/**
 * @author gchiaway
 * 日期: 2020-06-11
 * 时间: 12:57
 */
public interface UserApiService extends IService<SysUser> {

    /**
     * 重设密码
     *
     * @param userResetPasswordFrom 重设密码表单
     * @return 操作结果
     * @throws ServiceException 业务层异常
     */
    SeedMessageDTO resetPassword(UserResetPasswordFrom userResetPasswordFrom) throws ServiceException;

    /**
     * 根据用户id获取用户信息
     *
     * @param userId 用户id
     * @return 用户信息
     * @throws ServiceException 业务层异常
     */
    UserDTO getDetail(String userId) throws ServiceException;

    /**
     * 更新用户信息
     *
     * @param userInfoFrom 信息表单
     * @return 用户信息
     * @throws ServiceException 业务层异常
     */
    UserDTO update(UpdateUserInfoFrom userInfoFrom) throws ServiceException;

}
